package com.nsn.das.midas.util;

import java.util.HashMap;
import java.util.Map;

import com.nsn.das.midas.model.mml.data.MMLClassData;
import com.nsn.das.midas.model.mml.data.MMLGroupData;
import com.nsn.das.midas.model.mml.data.MMLProgramData;

public class ClazzUtils {
	public static final String COMMAND_CLASS_PATH = "commandClass";
	public static final String COMMAND_GROUP_PATH = "commandGroup";
	public static final String PROGRAM_DATA_PATH = "programData";
	
	private static Map<String,Class<?>> PATH_CLAZZ_MAP = new HashMap<String,Class<?>>(); 
	static{
		PATH_CLAZZ_MAP.put(COMMAND_CLASS_PATH,MMLClassData.class);
		PATH_CLAZZ_MAP.put(COMMAND_GROUP_PATH,MMLGroupData.class);
		PATH_CLAZZ_MAP.put(PROGRAM_DATA_PATH,MMLProgramData.class);
	}
	
	public static Class<?> getClazz(String clazzPath){
		return PATH_CLAZZ_MAP.get(clazzPath);
	}
}
